<?xml version="1.0" encoding="utf-8"?>
<xs:schema targetNamespace="http://localhost" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://localhost" elementFormDefault="qualified">
  <xs:element name="report">
    <xs:annotation>
      <xs:documentation xml:lang="ro">Lista serviciilor care se raportează către casa de asigurări intr-o anumită perioadă</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element name="clinicServices" minOccurs="0">
          <xs:annotation>
            <xs:documentation xml:lang="ro">Lista serviciilor clinice care se raportează către casa de asigurări.</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:sequence>
              <xs:element name="clinicService" minOccurs="0" maxOccurs="unbounded">
                <xs:annotation>
                  <xs:documentation xml:lang="ro">Serviciu clinic raportat</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="foreignPerson" type="foreignPersonType" minOccurs="0">
                      <xs:annotation>
                        <xs:documentation xml:lang="ro">Dacă pacientul beneficiar de serviciile medicale este de altă cetăţenie atunci se raportează şi datele de identificare.</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                  </xs:sequence>
                  <xs:attribute name="AppID" use="required">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Codul unic de identificare al înregistrării în aplicaţia de raportare</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="stencilNo" use="required">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Parafa medicului care a efectuat serviciul</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="6" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="specialityCode" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Codul specialitatatii medicului care a efectuat serviciu</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>                  
                  <xs:attribute name="personPID" use="required">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Codul numeric personal al pacientului</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="13" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="patientInsuranceHouse" use="required">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Codul casei de asigurări de sănătate</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="reportedService" use="required">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Codul serviciului raportat</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="medSrvPack" use="required">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Pachetul medical</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="quantity" type="xs:unsignedInt" use="required">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Numărul de servicii efectuate</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="serviceDate" type="xs:date" use="required">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Data la care a fost efectual serviciul</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="merNo" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Numărul de înregistrare în registru a serviciului efectuat</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="merDate" type="xs:date" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Data la care sa facut înregistrarea în registru</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="initialDiagnostic" use="required">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Diagonsticul iniţial</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="confirmedDiagnostic" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Diagnosticul comfirmat</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="presentationMode" use="required">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Modul de prezentare al pacientului.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:unsignedInt">
                        <xs:enumeration value="1">
                          <xs:annotation>
                            <xs:documentation xml:lang="ro">URGENTA</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="2">
                          <xs:annotation>
                            <xs:documentation xml:lang="ro">BILET DE TRIMITERE</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="3">
                          <xs:annotation>
                            <xs:documentation xml:lang="ro">SCRISOARE MEDICALA</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="4">
                          <xs:annotation>
                            <xs:documentation xml:lang="ro">CONTROL</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="5">
                          <xs:annotation>
                            <xs:documentation xml:lang="ro">PREZENTARE DIRECTA</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="6">
                          <xs:annotation>
                            <xs:documentation xml:lang="ro">ANEXA 10</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="7">
                          <xs:annotation>
                            <xs:documentation xml:lang="ro">BILET DE EXTERNARE</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="serviceType" use="required">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">TIPUL DE SERVICIU</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:unsignedInt">
                        <xs:enumeration value="1">
                          <xs:annotation>
                            <xs:documentation xml:lang="ro">CONSULTATIE INITIALA</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="2">
                          <xs:annotation>
                            <xs:documentation xml:lang="ro">CONSULTATIE DE CONTROL</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="3">
                          <xs:annotation>
                            <xs:documentation xml:lang="ro">CONSULTATIE SPECIFICA INITIALA</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="4">
                          <xs:annotation>
                            <xs:documentation xml:lang="ro">CONSULTATIE SPECIFICA CONTROL</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="5">
                          <xs:annotation>
                            <xs:documentation xml:lang="ro">SERVICII</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="6">
                          <xs:annotation>
                            <xs:documentation xml:lang="ro">SERVICII CONEXE</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="7">
                          <xs:annotation>
                            <xs:documentation xml:lang="ro">CONSULTATIE CONEXA INITIALA</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="8">
                          <xs:annotation>
                            <xs:documentation xml:lang="ro">CONSULTATIE CONEXA DE CONTROL</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="connectedPersonalPID" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">CNP persoană serviciu conex</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="13" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="serviceHour" type="xs:unsignedInt" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Ora la care a fost efectuat serviciu</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="diseaseType" type="xs:unsignedInt" use="required">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Tip diagnostic (0 - Acut, 1 - Subacut, 2- Cronic)</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="refferedByStencilNo" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Număr parafă medic care a emis biletul de trimitere</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="refferedBySerialNo" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Număr bilet de trimitere</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="refferedBySerialCode" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Serie bilet de trimitere</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="refferedBySpecialty" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Specialitatea medicului către care a fost emis biletul de trimitere</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="refferedByDiagnostic" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Diagnosticul prezumtiv din biletul de trimitere</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="refferedByContractNo" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Numărul contractului în baza căruia sa emis biletul de trimitere</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="refferedByDate" type="xs:date" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Data la care sa emis biletul de trimitere</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="personType" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Tipul pacientului (Valoarea codului din nomenclatorul de tipuri de persoană)</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="laboratoriesServices" minOccurs="0">
          <xs:annotation>
            <xs:documentation xml:lang="ro">Lista serviciilor paraclinice care se raportează către casa de asigurări.</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:sequence>
              <xs:element name="laboratoriesService" minOccurs="0" maxOccurs="unbounded">
                <xs:annotation>
                  <xs:documentation xml:lang="ro">Serviciu de laborator raportat</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="foreignPerson" type="foreignPersonType" minOccurs="0">
                      <xs:annotation>
                        <xs:documentation xml:lang="ro">Dacă pacientul beneficiar de serviciile medicale este de altă cetăţenie atunci se raportează şi datele de identificare legate de acest pacient.</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                  </xs:sequence>
                  <xs:attribute name="AppID" use="required">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Id-ul de identificare a serviciului paraclinic raportat.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="stencilNo" use="required">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Parafa medicului care a efectuat serviciu paraclinic.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="personPID" use="required">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Codul numeric personal al pacientului beneficiar de serviciu paraclinic.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="13" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="patientInsuranceHouse" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Casa de asigurare a pacientului.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="reportedService" use="required">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Codul serviciului paraclinic efectuat.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="medSrvPack" use="required">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Pachetul de asigurare medicală din care face parte serviciul.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="quantity" type="xs:unsignedInt" use="required">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Cantitatea serviciilor efectuate.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="serviceDate" type="xs:date" use="required">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Data la care s-a efectuat serviciul.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="merNo" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Numărul de ordine din registru medical primit la înregistrarea serviciului.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="merDate" type="xs:date" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Data la care serviciu paraclinic s-a înregistrat în registru medical.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="diagnostic" use="required">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Diagnosticul stabilit în urma efectuării serviciului paraclinic.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="reportedTarrif" type="xs:double" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Tariful serviciului paraclinic raportat.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="refferedByStencilNo" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Numar parafă medic care a întocmit biletul de trimitere în baza căruia sa efectuat serviciu medical.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="refferedBySerialNo" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Numărul biletului de trimitere.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="refferedBySerialCode" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Seria biletului de trimitere.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="refferedBySpecialty" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Specialitatea medicului care a emis biletul de trimitere.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="refferedByDiagnostic" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Diagnosticul prezumtiv din biletul de trimitere.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="refferedByContractNo" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Numărul de contract din biletul de trimitere.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="refferedByDate" type="xs:date" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Data la care a fost emis biletul de trimitere.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="patientSource" use="required">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Sursa pacientului, din ambulator sau internat. (Se completeaza cu valoarea implicita A)</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:enumeration value="A">
                          <xs:annotation>
                            <xs:documentation xml:lang="ro">Ambulator</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="I">
                          <xs:annotation>
                            <xs:documentation xml:lang="ro">Internat</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="nhpCode" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Codul PNS-ului în baza căruia a fost efectuat serviciul (valoarea codului din nomenclatorul de PNS-uri).</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="refferedByPC" type="xs:boolean" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Flag care indică dacă pacientul a fost strimis de către medicu de familie.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="personType" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Tipul pacientului (valoare din nomenclatorul de tipuri de persoana)</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="dailyServices" minOccurs="0">
          <xs:annotation>
            <xs:documentation xml:lang="ro">Lista serviciilor spitaliceşti care se raportează către casa de asigurări.</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:sequence>
              <xs:element name="dailyService" minOccurs="0" maxOccurs="unbounded">
                <xs:annotation>
                  <xs:documentation xml:lang="ro">Serviciu spitalicesc raportat</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:attribute name="AppID" use="required">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Id-ul de identificare a serviciului spitalicesc raportat.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="stencilNo" use="required">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Parafa medicului care efectuiază serviciu spitalicesc.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="personPID" use="required">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Codul numeric personal al pacientului beneficiar al serviciului spitalicesc.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="13" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="patientInsuranceHouse" use="required">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Codul casei de asigurări la care este asigurat pacientul.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="dailyServiceRegisterNo" use="required">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Numărul de ordine din registru medical primit la înregistrarea serviciului.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="contractNo" use="required">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Numărul contractului furnizorului de servicii cu casa de asigurări.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="reportedDailyService" use="required">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Codul serviciului spitalicesc raportat.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="medSrvPack" use="required">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Pachetul de asigurare din care face parte serviciul spitalicesc </xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="dailyServiceDate" type="xs:date" use="required">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Data la care sa efectuat serviciu spitalicesc.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="dailyServiceNote" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Observaţiile legate de serviciu spitalicesc.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="reportedTarrif" type="xs:double" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Tariful serviciului efectuat.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="quantity" type="xs:unsignedInt" use="required">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Cantitatea de servicii efectuate</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="refferedByStencilNo" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Numărul parafei medicului care a emis biletul de trimitere în baza căruia se efectuiază serviciu.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="refferedBySerialNo" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Numărul biletului de trimitere.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="refferedBySerialCode" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Seria biletului de trimitere.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="refferedBySpecialty" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Specialitatea medicului care a emis biletul de trimitere.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="refferedByDiagnostic" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Diagnosticul prezumtiv din biletul de trimitere.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="refferedByContractNo" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Numărul de contract din biletul de trimitere.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="refferedByDate" type="xs:date" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Data biletului de trimitere.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="diagnostic" use="required">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Diagnosticul confirmat în urma efectuării serviciului</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="prescriptions" minOccurs="0">
          <xs:annotation>
            <xs:documentation xml:lang="ro">Lista reţetelor medicale care se raportează</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:sequence>
              <xs:element name="prescription" minOccurs="0" maxOccurs="unbounded">
                <xs:annotation>
                  <xs:documentation xml:lang="ro">Reţetă raportată</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="prescriptionDrug" minOccurs="0" maxOccurs="unbounded">
                      <xs:annotation>
                        <xs:documentation xml:lang="ro">Lista medicamentelor care sunt prescrise pe o reţetă</xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
                        <xs:attribute name="AppID" use="required">
                          <xs:annotation>
                            <xs:documentation xml:lang="ro">Identificator unic al înregistrării</xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="20" />
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:attribute>
                        <xs:attribute name="no" type="xs:unsignedInt" use="optional">
                          <xs:annotation>
                            <xs:documentation xml:lang="ro">Numărul de ordine al medicamentului în reţetă.</xs:documentation>
                          </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="drugCode" use="optional">
                          <xs:annotation>
                            <xs:documentation xml:lang="ro">Codul medicamentului prescris</xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="20" />
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:attribute>
                        <xs:attribute name="activeSubstance" use="optional">
                          <xs:annotation>
                            <xs:documentation xml:lang="ro">Codul substanţei active ce intră în componenţa medicamentului.</xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="150" />
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:attribute>
                        <xs:attribute name="concentration" use="optional">
                          <xs:annotation>
                            <xs:documentation xml:lang="ro">Concentraţia de substanţă activă din conţinutul medicamentului.</xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="30" />
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:attribute>
                        <xs:attribute name="diseaseCategory" use="optional">
                          <xs:annotation>
                            <xs:documentation xml:lang="ro">Categoria bolii pentru care sa prescris medicamentul.</xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="20" />
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:attribute>
                        <xs:attribute name="diseaseCode" use="optional">
                          <xs:annotation>
                            <xs:documentation xml:lang="ro">Codul de boală pentru care sa prescris medicamentul.</xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="20" />
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:attribute>
                        <xs:attribute name="pharmaceuticalForm" use="optional">
                          <xs:annotation>
                            <xs:documentation xml:lang="ro">Forma farmaceutică a medicamentului.</xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="100" />
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:attribute>
                        <xs:attribute name="quantity" type="xs:double" use="optional">
                          <xs:annotation>
                            <xs:documentation xml:lang="ro">Cantitatea prescrisă</xs:documentation>
                          </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="dose" use="optional">
                          <xs:annotation>
                            <xs:documentation xml:lang="ro">Doza de medicament prescrisă</xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="20" />
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:attribute>
                      </xs:complexType>
                    </xs:element>
										<xs:element name="prescriptionTest" minOccurs="0" maxOccurs="1">
											<xs:annotation>
												<xs:documentation xml:lang="ro">Teste medicale prescrise pe reţetă</xs:documentation>
											</xs:annotation>
											<xs:complexType>
												<xs:attribute name="AppID" use="required">
													<xs:annotation>
														<xs:documentation xml:lang="ro">Identificator unic al înregistrării</xs:documentation>
													</xs:annotation>
													<xs:simpleType>
														<xs:restriction base="xs:string">
															<xs:maxLength value="20" />
														</xs:restriction>
													</xs:simpleType>
												</xs:attribute>
												<xs:attribute name="testName" use="optional">
													<xs:annotation>
														<xs:documentation xml:lang="ro">Denumire test medical</xs:documentation>
													</xs:annotation>
													<xs:simpleType>
														<xs:restriction base="xs:string">
															<xs:maxLength value="100" />
														</xs:restriction>
													</xs:simpleType>
												</xs:attribute>
												<xs:attribute name="monthsNo" type="xs:int" use="required">
													<xs:annotation>
														<xs:documentation xml:lang="ro">Număr de luni</xs:documentation>
													</xs:annotation>
												</xs:attribute>
												<xs:attribute name="patientType" use="required">
													<xs:annotation>
														<xs:documentation xml:lang="ro">Tip pacient</xs:documentation>
													</xs:annotation>
													<xs:simpleType>
														<xs:restriction base="xs:string">
															<xs:enumeration value="COPIL"/>
															<xs:enumeration value="ADULT"/>
														</xs:restriction>
													</xs:simpleType>
												</xs:attribute>
											</xs:complexType>
										</xs:element>
                  </xs:sequence>
                  <xs:attribute name="AppID" use="required">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">ID-ul de identificare a unei reţete raportate.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="stencilNo" use="required">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Parafa medicului care prescrie reţeta.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="personPID" use="required">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Codul numeric personal al pacientului pentru care se prescrie reţeta.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="patientInsuranceHouse" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Codul casei de asigurări cu care sa încheiat contractul de compensare medicamente.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="serialNo" use="required">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Numărul reţetei.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="serialCode" use="required">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Seria reţetei</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="contractNo" use="required">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Numărul contractului încheiat între furnizor şi casa de asigurări.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="prescriptionDate" type="xs:date" use="required">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Data la care a fost emisă reţeta.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="merNo" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Numărul din registru medical.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="merDate" type="xs:date" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Data la care a fost înregistrată reţeta în registru medical.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="patientType" use="required">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Tipul pacientului (codul din nomenclatorul de stări de asigurare ale unei persoane).</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="nhp" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Numărul programului naţional de sănătate.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="prescriptionType" use="required">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Tipul de reţetă (valoare din nomenclatorul de tipuri de reţete)</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="30" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="medicalNotes" minOccurs="0">
          <xs:annotation>
            <xs:documentation xml:lang="ro">Lista biletelor de trimitere ce se raportează către casa de asigurări</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:sequence>
              <xs:element name="medicalNote" minOccurs="0" maxOccurs="unbounded">
                <xs:annotation>
                  <xs:documentation xml:lang="ro">Bilet de trimitere raportat</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="foreignPerson" type="foreignPersonType" minOccurs="0">
                      <xs:annotation>
                        <xs:documentation xml:lang="ro">Dacă pacientul beneficiar de serviciile medicale este de altă cetăţenie atunci se raportează şi datele legate de acest pacient.</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name="medicalNoteInvestigation" minOccurs="0" maxOccurs="unbounded">
                      <xs:annotation>
                        <xs:documentation xml:lang="ro">Investigaţii prescrise pe biletul de trimitere</xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
                        <xs:attribute name="AppID" use="required">
                          <xs:annotation>
                            <xs:documentation xml:lang="ro">ID-ul de identificare a investigaţiei prescrise pe biletul de trimitere</xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="20" />
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:attribute>
                        <xs:attribute name="no" type="xs:unsignedInt" use="required">
                          <xs:annotation>
                            <xs:documentation xml:lang="ro">Numărul de ordine al investigaţiei.</xs:documentation>
                          </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="investigation" use="required">
                          <xs:annotation>
                            <xs:documentation xml:lang="ro">Codul investigaţiei medicale.</xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="xs:string">
                              <xs:maxLength value="20" />
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:attribute>
                        <xs:attribute name="quantity" type="xs:unsignedInt" use="required">
                          <xs:annotation>
                            <xs:documentation xml:lang="ro">Cantitatea de investigaţii ce urmează să se facă.</xs:documentation>
                          </xs:annotation>
                        </xs:attribute>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="secondaryDiagnostics" minOccurs="0" maxOccurs="unbounded">
                      <xs:annotation>
                        <xs:documentation xml:lang="ro">Lista diagnosticelor secundare de pe biletul de trimitere</xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="secondaryDiagnostic" minOccurs="0" maxOccurs="unbounded">
                            <xs:annotation>
                              <xs:documentation xml:lang="ro">Diagnostice secundare raportate</xs:documentation>
                            </xs:annotation>
                            <xs:complexType>
                              <xs:attribute name="no" type="xs:int" use="required">
                                <xs:annotation>
                                  <xs:documentation xml:lang="ro">numarul de ordine al diagnosticului</xs:documentation>
                                </xs:annotation>
                              </xs:attribute>
                              <xs:attribute name="code" use="required">
                                <xs:annotation>
                                  <xs:documentation xml:lang="ro">Codul diagnosticului secudar luat din tabela ICD10</xs:documentation>
                                </xs:annotation>
                                <xs:simpleType>
                                  <xs:restriction base="xs:string">
                                    <xs:maxLength value="20" />
                                  </xs:restriction>
                                </xs:simpleType>
                              </xs:attribute>
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                  <xs:attribute name="AppID" use="required">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">ID-ul unic de identificare a biletului de trimitere raportat.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="stencilNo" use="required">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Parafa medicului care a emis biletul de trimitere.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="personPID" use="required">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Codul numeric personal al pacientului pentru care sa emis biletul de trimitere.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="13" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="patientInsuranceHouse" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Codul casei de asigurări.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="serialNo" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Numărul biletului de trimitere.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="serialCode" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Seria biletului de trimitere.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="issueDate" type="xs:date" use="required">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Data biletului de trimitere emis.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="merNo" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Numărul din registru medical pentru fişa medicală.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="merDate" type="xs:date" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Data la care sa făcut înregistrarea biletului în registru medical.</xs:documentation>
                    </xs:annotation>
                  </xs:attribute>
                  <xs:attribute name="ticketType" use="required">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Tipul biletului de trimitere</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:unsignedInt">
                        <xs:enumeration value="1">
                          <xs:annotation>
                            <xs:documentation xml:lang="ro">CLINICE</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="2">
                          <xs:annotation>
                            <xs:documentation xml:lang="ro">DE LABORATOR</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="diagnostic" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Diagnosticul principal de pe biletul de trimitere .</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="specialty" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Specialitatea pentru care se face emiterea biletului de trimitere.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="personType" use="optional">
                    <xs:annotation>
                      <xs:documentation xml:lang="ro">Tipul de pacient.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="xs:string">
                        <xs:maxLength value="20" />
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:attribute>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="AppKey" use="optional">
        <xs:annotation>
          <xs:documentation xml:lang="ro">Cheia de identificare a aplicaţiei de raportare (producator de software 3rd partry)</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:maxLength value="20" />
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="AppID" use="required">
        <xs:annotation>
          <xs:documentation xml:lang="ro">ID-ul de identificare a raportului.</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:maxLength value="20" />
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="clinic" use="required">
        <xs:annotation>
          <xs:documentation xml:lang="ro">Denumire unitate medicală</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:maxLength value="100" />
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="fiscalCode" use="required">
        <xs:annotation>
          <xs:documentation xml:lang="ro">Codul fiscal al furnizorului.</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:maxLength value="20" />
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="contractNo" use="required">
        <xs:annotation>
          <xs:documentation xml:lang="ro">Numărul de contract încheiat intre furnizor şi casa de asigurări.</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:maxLength value="20" />
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="insuranceHouse" use="required">
        <xs:annotation>
          <xs:documentation xml:lang="ro">Codul casei de asigurări către care se face raportarea.</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:maxLength value="20" />
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="reportingDate" type="xs:date" use="required">
        <xs:annotation>
          <xs:documentation xml:lang="ro">Data la care se face raportarea.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="startFrom" type="xs:date" use="required">
        <xs:annotation>
          <xs:documentation xml:lang="ro">Data de început a perioadei de raportare.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="endTo" type="xs:date" use="required">
        <xs:annotation>
          <xs:documentation xml:lang="ro">Data de sfârşit a perioadei de raportare.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="invoiceNo" use="optional">
        <xs:annotation>
          <xs:documentation xml:lang="en">Invoice number</xs:documentation>
          <xs:documentation xml:lang="ro">Numar factura</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:maxLength value="20" />
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="invoiceDate" type="xs:date" use="optional">
        <xs:annotation>
          <xs:documentation xml:lang="en">Invoice date</xs:documentation>
          <xs:documentation xml:lang="ro">Data factura</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="invoiceValue" type="xs:decimal" use="optional">
        <xs:annotation>
          <xs:documentation xml:lang="en">Invoice amount</xs:documentation>
          <xs:documentation xml:lang="ro">Valoare factura</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="labValue" type="xs:double" use="required">
        <xs:annotation>
          <xs:documentation xml:lang="ro">Valoarea totala a serviciilor paraclinice</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="hspValue" type="xs:double" use="required">
        <xs:annotation>
          <xs:documentation xml:lang="ro">Valoarea totala a serviciilor spitalicesti</xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:complexType name="foreignPersonType">
    <xs:annotation>
      <xs:documentation xml:lang="ro">Tipul de date folosit pentru persoane străine</xs:documentation>
    </xs:annotation>
    <xs:attribute name="personIdentifier" use="required">
      <xs:annotation>
        <xs:documentation xml:lang="ro">Identificatorul unic al persoanei</xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="20" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="personFirstName" use="optional">
      <xs:annotation>
        <xs:documentation xml:lang="ro">Prenumele persoanei</xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="40" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="personLastName" use="optional">
      <xs:annotation>
        <xs:documentation xml:lang="ro">Numele de familie al persoanei</xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="40" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="birthDate" type="xs:date" use="optional">
      <xs:annotation>
        <xs:documentation xml:lang="ro">Data naşterii</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="countryCode" use="optional">
      <xs:annotation>
        <xs:documentation xml:lang="ro">Codul de ţară (valoare din nomenclatorul de ţări)</xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="20" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="cardCode" use="optional">
      <xs:annotation>
        <xs:documentation xml:lang="ro">Codul cardului de asigurat european (dacă este cazul)</xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="40" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="cardExpireDate" type="xs:date" use="optional">
      <xs:annotation>
        <xs:documentation xml:lang="ro">Data expirării cardului</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="emissiveOrgUnitCode" use="optional">
      <xs:annotation>
        <xs:documentation xml:lang="ro">Codul casei de asiguri emitente</xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:maxLength value="30" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
</xs:schema>